import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import get from '@dfeidao/atom-web/local/get';
import fire from '@dfeidao/atom-web/msg/fire';
import error from '@dfeidao/atom-web/msgbox/error';
import set_node_cls from '@dfeidao/atom-web/ui/set-node-cls';
export default async function a005(fd: IFeidaoAiBrowserComponent) {
	if (get(fd, 'address') === undefined) {
		error("请点击所在地址");
		return;
	}
	const address = get(fd, 'address');
	const map = fd.data.node.querySelector<HTMLElement>('[data-id="map"]');
	set_node_cls(map, 'display-n', true);
	if (get(fd, 'type') === "添加") {
		fire('zj-000003', 'a004', address);
	} else {
		fire('zj-000004', 'a004', address);
	}
}
